package com.novax.ex.activity.infrastructure.mapper;

import com.novax.ex.activity.infrastructure.entity.MallPrizeOrder;
import com.novax.ex.common.base.BaseEntity;
import com.novax.ex.common.base.BaseMapper;
import com.novax.ex.common.util.PageUtil;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Set;

/**
 * @Description
 * @Author zhaolei
 * @Date 3/28/23 7:52 PM
 * @Version 1.0
 */
public interface MallPrizeOrderMapper extends BaseMapper {

    /**
     * @description: 获取消息
     * @author: Wade
     * @date: 3/29/23 11:12 AM
     * @param: []
     * @return: java.util.List<com.novax.ex.activity.infrastructure.entity.MallPrizeOrder>
     **/
    List<MallPrizeOrder> selectMsg();

    /**
     * @description: 查询用户是否存在未领取
     * @author: Wade
     * @date: 3/29/23 11:12 AM
     * @param: [userId]
     * @return: com.novax.ex.activity.infrastructure.entity.MallPrizeOrder
     **/
    MallPrizeOrder unclaimed(@Param("userId") Long userId);

    /**
     * @description: 修改状态为已参与
     * @author: Wade
     * @date: 3/29/23 11:11 AM
     * @param: [mallPrizeId]
     * @return: void
     **/
    void updateParticipated(@Param("mallPrizeId") Long mallPrizeId);

    /**
     * Description: 商品参与报表-统计
     *
     * @return java.lang.Long
     * @author Deucalion@novax.email
     * @date 2023/2/23 10:24
     */
    Long participationRecordCount(PageUtil pageInfo);

    /**
     * Description: 商品参与报表
     *
     * @author Deucalion@novax.email
     * @date 2023/3/16 11:36
     */
    <T extends BaseEntity> List<T> participationRecordPage(PageUtil pageInfo);

    /**
     * @description: 修改销售价格
     * @author: Wade
     * @date: 3/29/23 11:13 AM
     * @param: [mallPrizeId]
     * @return: void
     **/
    void updatePrice(@Param("mallPrizeId") Long mallPrizeId,@Param("price") BigDecimal price);

    /***
     * @description: 修改成本价格
     * @author: Wade
     * @date: 3/29/23 11:13 AM
     * @param: [mallPrizeId]
     * @return: void
     **/
    void updateCost(@Param("mallPrizeId") Long mallPrizeId,@Param("cost") BigDecimal cost,@Param("costCurrency") String costCurrency);

    /**
     * Description: 批量状态变更
     *
     * @return int
     * @author Deucalion@novax.email
     * @date 2023/4/3 9:10
     */
    int batchStatusChange(@Param("orders") List<MallPrizeOrder> orders);
    
    /**
     * Description: 支付记录统计
     *
     * @author Deucalion@novax.email
     * @date 2023/10/10 9:02
     */
    Long paymentRecordCount(PageUtil pageInfo);

    /**
     * Description: 支付记录查询
     *
     * @author Deucalion@novax.email
     * @date 2023/3/16 11:36
     */
    <T extends BaseEntity> List<T> paymentRecordPage(PageUtil pageInfo);
}
